<div class="row">
    <div class="col-md-6">
        <div class="card bg-light rounded-0">
            <div class="card-header">Config Reactive Form</div>
            <div class="card-body">
                <form [formGroup]="configForm" (ngSubmit)="onSubmit()">
                    <div class="form-group">
                        <label >Server</label>
                        <input [class.is-invalid]="configForm.get('server').invalid &&
                                                   configForm.get('server').touched" 
                               [class.bg-warning]="configForm.get('server').dirty && 
                                                   configForm.get('server').valid"
                                type="text" 
                               class="form-control" formControlName="server" placeholder="Enter server name or ip">
                        <small [class.d-none]="configForm.get('server').valid || 
                                            configForm.get('server').pristine" 
                                            class="text-danger">Server is required</small>                    
                    </div>
                    <div class="form-group">
                        <label>User</label>
                        <input [class.is-invalid]="configForm.get('user').invalid &&
                                                   configForm.get('user').touched" 
                               [class.bg-warning]="configForm.get('user').dirty && 
                                                   configForm.get('user').valid"
                                class="form-control" type="text" formControlName="user">
                                <small [class.d-none]="configForm.get('user').valid || 
                                configForm.get('user').pristine" 
                                class="text-danger">User is required</small>                    
        </div>
                    <div class="form-group">
                        <label>Password</label>
                        <input [class.is-invalid]="configForm.get('password').invalid &&
                                                   configForm.get('password').touched" 
                               [class.bg-warning]="configForm.get('password').dirty && 
                                                   configForm.get('password').valid"
                        class="form-control" type="password" formControlName="password">
                    </div>
                    <button type="submit" 
                            [disabled]="configForm.invalid || configForm.pristine"
                    class="btn btn-primary">Submit</button>
                </form>
                <!--
                <form>
                    <div class="form-group">
                        <label for="server" >Server</label>
                        <input type="text" class="form-control" [formControl]="server">
                        <small id="serverHelp" class="form-text text-muted">Address of your Huawei router</small>
                    </div>
                    <div class="form-group">
                        <label for="user">User</label>
                        <input class="form-control" type="text" [formControl]="user">
                    </div>
                    <div class="form-group">
                        <label for="password">Password</label>
                        <input class="form-control" type="password" [formControl]="password">
                    </div>
                    <button type="submit" class="btn btn-primary">Submit</button>
                </form>
                -->
            </div>
        </div>
    </div>
</div>